package net.ermannofranco.genericdaojdbc.model.annotation;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import net.ermannofranco.genericdaojdbc.model.Entity;

@Target(value = { java.lang.annotation.ElementType.TYPE })
@Retention(value = java.lang.annotation.RetentionPolicy.RUNTIME)
public @interface ManyToOne {

	/**
	 * Name of the field with holds the foreign entity reference.
	 * @return
	 */
	String property();

	/**
	 * Database column with holds the foreign key.
	 * @return
	 */
	String column();
	
	/**
	 * Spring name of dao bean with queries for the associated entity.
	 * @return
	 */
	String daoBeanId();

	/**
	 * Class of foreign entity.
	 * @return
	 */
	Class<? extends Entity<? extends Number>> entityClass();
}
